//
//  IncubationSpacePrincipleCell.m
//  BigToBig
//
//  Created by yi liu on 16/8/8.
//  Copyright © 2016年 cn.cloudtp. All rights reserved.
//

#import "IncubationSpacePrincipleCell.h"

@implementation IncubationSpacePrincipleCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle: style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
        
    }
    return self;
}

- (void)createSubViews{
    self.principleValueLabel = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth / 3 * 2 - 10, 0, kScreenWidth / 3 - 10, self.height)];
    _principleValueLabel.font = [UIFont systemFontOfSize:15];
    _principleValueLabel.textColor = [UIColor lightGrayColor];
    _principleValueLabel.textAlignment = NSTextAlignmentRight;
    
    [self.contentView addSubview:_principleValueLabel];
    
    self.principleKeyLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, kScreenWidth / 3, self.height)];
    _principleKeyLabel.font = [UIFont systemFontOfSize:14];
    _principleKeyLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:_principleKeyLabel];
    
    
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.principleValueLabel.frame = CGRectMake(kScreenWidth / 3 * 2 - 10, 0, kScreenWidth / 3 - 20, self.height);
    self.principleKeyLabel.frame = CGRectMake(10, 0, kScreenWidth / 3, self.height);
    // 分割线
    UILabel *lineLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, self.height - 1, kScreenWidth, 1)];
    lineLabel.backgroundColor = COLOR_RGBA(247, 247, 247, 1);
    [self.contentView addSubview:lineLabel];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
